package com.kedacom.freedomLabel.utils.validator;

import android.text.TextUtils;
import android.widget.TextView;

/**
 * @author licheng
 * @since 2020/2/2 12:13
 */
public class ValidationModel {

    private TextView textView;
    private ValidationExecutor validationExecutor;

    public ValidationModel(TextView textView, ValidationExecutor executor) {
        this.textView = textView;
        this.validationExecutor = executor;
    }

    public TextView getTextView() {
        return textView;
    }

    public ValidationExecutor getValidationExecutor() {
        return validationExecutor;
    }

    public boolean isEmpty() {
        return textView == null || TextUtils.isEmpty(textView.getText());
    }
}